package com.ms.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ms.mapper.EnterpriseMapper;
import com.ms.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by dell on 2016/10/25.
 */
@Service
public class EnterpriseServiceImpl implements EnterpriseService {


    @Autowired
    private EnterpriseMapper enterpriseMapper;

    @Override
    public PageInfo<Map> search(int pageNum, int pageSize) {
//        PageHelper.startPage(pageNum,pageSize,"TranCode");
        Map param=new HashMap<>();
        param.put("condition","epname like '%成都%'");
        param.put("pageSize",pageSize);
        param.put("pageNum",pageNum);
        List list= enterpriseMapper.search(param);
        return new PageInfo<>(list);
    }
}
